<template>
	<view class='nav'>
		 <view class='navitem' @tap="touchHandle(1)">
		 			 <image src="../../static/cate.png" mode="" class='img'></image>
		 			 <text class='text'>分类</text>
		 </view>
		 <view class='line'></view>
		 <view class='navitem' @tap="touchHandle(2)">
		 			 <image src="../../static/paihang.png" mode="" class='img'></image>
		 			 <text class='text'>排行</text>
		 </view>
		 <view class='line'></view>
		 <view class='navitem navitem3' @tap="touchHandle(3)">
		 			 <image src="../../static/shudan.png" mode="" class='img'></image>
		 			 <text class='text'>书单</text>
		 </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		methods:{
			touchHandle(index){
				if(index == 1){
					uni.navigateTo({
						url:'../../pages/classify/classify'
					})
				}else if(index == 2){
					uni.navigateTo({
						url:'../../pages/ranking/ranking'
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.nav{
		width: 100%;
		height:60px;
		border-bottom:5px solid #ddd;
		display: flex;
		align-items: center;
		.line{
			width: 0;
			height: 40%;
			border: 1px solid #ddd;
		}
		.navitem{
			flex:1;
			display: flex;
			justify-content: center;
			align-items: center;
			.img{
				width:34px;
				height:34px;
				margin-right: 10px;
			}
			.text{
				font-size: 16px;
			}
		}
	}
</style>
